package course.dmsSpringBoot.entity;

import lombok.Getter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

/**
 * @author zouran
 * createDate：2023/12/8  20:36
 */

@Getter
@Component
public class MyConfigClass {
    private final Environment env;

    @Autowired
    public MyConfigClass(Environment env) {
        this.env = env;
    }

    public String getMessage() {
        return env.getProperty("example.message");
    }
}
